# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Forms.V1.Model.MediaProperties do
  @moduledoc """
  Properties of the media.

  ## Attributes

  *   `alignment` (*type:* `String.t`, *default:* `nil`) - Position of the media.
  *   `width` (*type:* `integer()`, *default:* `nil`) - The width of the media in pixels. When the media is displayed, it is scaled to the smaller of this value or the width of the displayed form. The original aspect ratio of the media is preserved. If a width is not specified when the media is added to the form, it is set to the width of the media source. Width must be between 0 and 740, inclusive. Setting width to 0 or unspecified is only permitted when updating the media source.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :alignment => String.t() | nil,
          :width => integer() | nil
        }

  field(:alignment)
  field(:width)
end

defimpl Poison.Decoder, for: GoogleApi.Forms.V1.Model.MediaProperties do
  def decode(value, options) do
    GoogleApi.Forms.V1.Model.MediaProperties.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Forms.V1.Model.MediaProperties do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
